using System;
using System.Collections.Generic;
//using System.Net.Sockets;
using System.Text;
using System.IO;

using ExchangeHog.Pop3Client.Responses;

namespace ExchangeHog.Pop3Client.Commands
{
    internal sealed class DeleCommand : Pop3Command<Pop3Response>
    {
        int _messageId = int.MinValue;

        public DeleCommand(Stream stream, int messageId): base(stream, false, Pop3State.Transaction)
        {
            if (messageId < 0)
                throw new ArgumentOutOfRangeException("_messageId");
            _messageId = messageId;
        }

        protected override byte[] CreateRequestMessage()
        {
            return GetRequestMessage(string.Concat(Pop3Commands.Dele, _messageId.ToString(), Pop3Commands.Crlf));
        }
    }
}
